package com.whale.widget;

import android.app.Dialog;
import android.content.Context;
import android.view.Window;
import android.view.animation.Animation;
import android.view.animation.AnimationUtils;
import android.widget.ImageView;
import android.widget.TextView;

import com.whale.R;

public class ProgressDialog extends Dialog {

    private Animation anim;
    private ImageView circleView;
    private TextView  msgView;

    public ProgressDialog(Context paramContext){
        super(paramContext, 0);// 16973839
        requestWindowFeature(Window.FEATURE_NO_TITLE);
        setContentView(R.layout.progress_dialog);
        circleView = (ImageView) findViewById(R.id.progressImageView);
        anim = AnimationUtils.loadAnimation(getContext(), R.anim.rotate);
        msgView = (TextView) findViewById(R.id.progressTextView);
    }

    public void setMessage(String paramString) {
        msgView.setText(paramString);
    }

    public void show() {
        super.show();
        circleView.startAnimation(anim);
    }
}
